package com.demo.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.List;

public class App {

    public static void main(String[] args) {

        // 1 ConfigurableApplicationContext context = SpringApplication.run(App2.class, args);
        SpringApplication app = new SpringApplication(App2.class);
        ConfigurableApplicationContext context = app.run(args);
        context.getBean("createRunable",Runnable.class).run();
        System.out.println(context.getBean(User.class));
        System.out.println(context.getBean(List.class).size());
        context.close();

    }
}
